home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / util / edit / jed207.lha / src / jed.lha / sprintf.a < prev    next >
Text File  |  1992-10-20  |  865b  |  46 lines

  1.  
  2.         ; SPRINTF.A
  3.         ;
  4.         ; RawDoFmt() string formatters.
  5.  
  6.         section    text,code
  7.         xref    _LVORawDoFmt
  8.  
  9. ;Prototype VOID    sprintf(STRPTR,    STRPTR,    ...);
  10.         xdef    _sprintf
  11. _sprintf:
  12.         movem.l    a2-a3/a6,-(sp)
  13.         move.l    20(sp),a0
  14.         lea    24(sp),a1
  15.         move.l    16(sp),a3
  16.         lea    stuffit(pc),a2
  17.         move.l    4.w,a6
  18.         jsr    _LVORawDoFmt(a6)
  19.         movem.l    (sp)+,a2-a3/a6
  20.         rts
  21.  
  22. ; The registerized arg conventions are those used by DICE, this    means
  23. ; that this routine will probably have to be altered for SAS, etc...
  24. ;
  25. ;Prototype VOID    vsprintf(STRPTR, STRPTR, APTR);
  26. ;             a0     a1     d0
  27.         xdef    _vsprintf
  28.         xdef    @vsprintf
  29. _vsprintf:                ; in case I don't use -mRR
  30.         movem.l    4(sp),a0-a1
  31.         move.l    12(sp),d0
  32. @vsprintf:
  33.         movem.l    a2-a3/a6,-(sp)
  34.         move.l    a0,a3
  35.         move.l    a1,a0
  36.         move.l    d0,a1
  37.         lea    stuffit(pc),a2
  38.         move.l    4.w,a6
  39.         jsr    _LVORawDoFmt(a6)
  40.         movem.l    (sp)+,a2-a3/a6
  41.         rts
  42. stuffit:
  43.         move.b    d0,(a3)+
  44.         rts
  45.  
  46.